# Important Note:

this project has been archived and migrated to codeberg. To access the project on codeberg,

[visit this Link](https://codeberg.org/alimiracle/ask)

# Ask:
This documentation provides an overview of the Ask application, which is a command-line interface that enables users to chat with an AI model using the OpenAI API.

## Build Requirements:

- Rust programming language (https://www.rust-lang.org/tools/install)
- OpenAI API key (https://beta.openai.com/signup/)

## Installation:

1. Clone the repository to your local machine using the command:

    ```
    git clone https://notabug.org/alimiracle/ask
    ```
   
   or download and extract the zip file.

2. Navigate to the project directory and run the following command to build the application:

    ```
    cargo build --release
    ```

## Usage:

1. Set the OpenAI API key as an environment variable in your terminal:

    ```
    export OPENAI_KEY=<your-OPENAI-key>
    ```

2. Optionally, set the OpenAI model as an environment variable:

```
export OPENAI_MODEL=<your-OPENAI-model>
```

If you do not set this variable, the application will use the default model "gpt-3.5-turbo-0613".

3. Run the application by executing the following command:

    ```
./target/release/ask <message>
    ```

Replace `<message>` with the message you want to send to the GPT-3 language model.

Alternatively, you can run the application without providing a message as an argument. In this case, the application will prompt you to enter a message through the command line.

## Conclusion:

The Ask application is a simple command-line interface that enables users to chat with an AI model using the OpenAI API. It is written in Rust and uses the reqwest and serde libraries to interact with the API. Users can set their OpenAI API key as an environment variable and run the application to start chatting with the AI model.

## License:
The `ask` application is licensed under the GPLv3 License. See the `LICENSE` file for more information.
